<extend name="Public:Base" />
<block name="title">
    <title>锁掌柜 - 微预定认证管理</title>
</block>
<block name="extendHead">
</block>
<block name="document">
    <div id="doc" data-side-menu-id="sideMenuBookingAuth" data-side-menu-toggle-id="collapseBookToggle">
        <div id="doc-header">
            <include file="Public:Include_navbar" />
        </div>
        <div id="doc-center">

            <div class="container">
                <div class="col-xs-3-15">
                    <include file="Public:Include_sideMenu" />
                </div>
                <div class="col-xs-12-15">
                    <nav class="navbar navbar-default navbar-custom-fitin">
                        <div class="container-fluid">
                            <p class="navbar-text custom-navber-text">微预定认证管理</p>
                        </div>
                    </nav>
                    <nav class="navbar navbar-default navbar-custom-fitin nav-padding">
                        <div class="container-fluid">
                            <div class="collapse navbar-collapse">
                               
                                    <div class="form-group">
                                        <label class="col-xs-1 control-label">客栈名称</label>
                                        <div class="col-xs-2">
                                            <input type="text" value="" class="form2-control col-xs-6" name="hotelName" id="hotelName" />
                                        </div>
                                        <label class="col-xs-1 control-label">认证状态</label>
	                                    <div class="col-xs-2">                                             
	                                        <select name="status" id="authType" class="form-control">
	                                            <option value="0">全部</option>
	                                            <option value="1" {:1 == $authType ? 'selected' : ''}>未申请</option>
	                                            <option value="2" {:2 == $authType ? 'selected' : ''}>待审核</option>
	                                            <option value="3" {:3 == $authType ? 'selected' : ''}>已通过</option>
	                                            <option value="4" {:4 == $authType ? 'selected' : ''}>已拒绝</option>                                            
	                                        </select>
                                        </div>
                                        <div class="col-xs-2">
                                            <a id="btn_search" href="javascript:void(0);" class="btn btn-default btn-sm  glyphicon glyphicon-search" >查找</a>
                                        </div>
                                    </div>
                            </div>
                        </div>
                    </nav> 
                    <div class="well well-custom-has-navbar">
                        <div class="well-custom-body">
                            <div class="table-responsive">
                                <table class="table table-bordered table-hover" id="questionTalbe">
                                    <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>客栈名</th>
                                            <th>认证标志</th>
                                            <th>到期时间</th>
                                            <th>状态</th>
                                            <th>押金</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="dataList" item="vo">
                                        <tr>
                                            <td>{$vo.hotelentity_id}</td>
                                            <td>{$vo.hotelentity_name}</td>
                                            <td>
                                                <if condition="$vo.certified eq 1">
                                                <span style="color:green">有</span>
                                                <else/>
                                                <span style="color:red">无</span>
                                                </if>
                                            </td>
                                            <td><span style="{$vo.app_dueStyle}">{$vo.certifiedenddate}</span></td> 
                                            <td>
                                                <if condition="$vo.status eq 0">
                                                <span>未申请</span>
                                                <elseif condition="$vo.status eq 1"/>
                                                <span>待审核</span>
                                                <elseif condition="$vo.status eq 2"/>
                                                <span>已通过</span>
                                                <elseif condition="$vo.status eq 3"/>
                                                <span>已拒绝</span>
                                                <else/>
                                                </if>
                                            </td>                                           
                                            <td>{$vo.deposit}</td>
                                            <td>
                                            <if condition="$vo.status neq 0">
                                            <button data-infoName="{$vo.hotelname}" data-infoContact="{$vo.contact}" data-infoTelephone="{$vo.telephone}" data-infoAddress="{$vo.address}" class="btn btn-default  btn-sm info">详情</button>
                                            <button data-id="{$vo.hotelentity_id}" data-hotelName="{$vo.hotelentity_name}" data-endDate="{$vo.certifiedenddate}" data-Status="{$vo.status}" data-Deposit="{$vo.deposit}" class="btn btn-default  btn-sm edit">管理</button>
                                            </if>
                                            </td>
                                        </tr>
                                    </foreach>
                                    <tr class="padtopx"><td colspan="7">{$page}</td></tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div id="doc-footer">
            <include file="Public:Include_footer" />
        </div>
    </div> 
    
    <div class="modal fade" id="infoModel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">认证信息</h4>
                </div>
                <div class="modal-body">
                    <div class="form-container">
                        <div class="custom-form-body">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label for="requestQuestion" class="col-xs-3 control-label">认证名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="infoName" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-3 control-label">联系人：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="infoContact" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-3 control-label">联系电话：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="infoTelephone" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-3 control-label">联系地址：</label>
                                    <div class="col-xs-9">
                                        <textarea class="form-control" rows="3" id="infoAddress" readonly="readonly"></textarea>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>
    
    <div class="modal fade" id="editModel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">认证管理</h4>
                </div>
                <div class="modal-body">
                    <div class="form-container">
                        <div class="custom-form-body">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">客栈名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditHotel"  readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">到期时间：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditEnddate" style="cursor: pointer;"  >
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestDesc" class="col-xs-3 control-label">状态：</label>
                                    <div class="col-xs-6">                                                                                     
                                            <select name="status" id="requestEditAuthType" class="form-control">
                                                <option value="0">未申请</option>
                                                <option value="1">待审核</option>
                                                <option value="2">已通过</option>
                                                <option value="3">已拒绝</option>                                            
                                            </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-3 control-label">押金：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditDeposit" style="cursor: pointer;"  >
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden"  id="requestId" value="" />
                    <lable id="saveInfo" style="color:red"></lable>
                    <button type="button" class="btn btn-default" id="requestCannel" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary"  data-value="" id="requestEdit">保存</button>
                </div>
            </div>
        </div>
    </div>
    <!--end of doc-->
</block>

<block name="extendFootJs">
    <script type="text/javascript" src="__PUBLIC__/jslib/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/src/meizhu/common.js"></script>    
    <script type="text/javascript" src="__PUBLIC__/uclbrt/js/jquery-plugin/tooltip.js"></script>
    <script type="text/javascript" src="__PUBLIC__/src/meizhu/Booking/auth.js"></script>
</block>

